<!DOCTYPE html>
<html>
<head>
    <title><%= title %></title>
    <link rel='stylesheet' href='/stylesheets/style.css' />
</head>
<body>
<%- include header %>
<article>
    <% if (success) { %>
    <div><%= success %></div>
    <% } %>
    <% if (error) { %>
    <div><%= error %></div>
    <% } %>
</article>
<% posts.forEach(function (post,index) { id = post._id.toString();  %>
<p><h2><a href="/id/<%= id %>"></a></h2></p>
<p><a href="/u/<%= post.name %>"><%= post.name %></a></p>
<p><%= post.time.minute %></p>
<p><%- post.post %></p>
<% }) %>
</body>
</html>
